// Program sprawdzajcy, czy podana liczba jest parzysta, czy nieparzysta (wersja 2.)

#import <Foundation/Foundation.h>

int main (int argc, char *argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

    int number_to_test, remainder;

    NSLog (@"Podaj liczb:");
    scanf ("%i", &number_to_test);

    remainder = number_to_test % 2;

    if ( remainder == 0 )
        NSLog (@"Liczba jest parzysta.");
    else
        NSLog (@"Liczba jest nieparzysta.");

    [pool drain];
    return 0;
}